package com.mtnz.njk.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mtnz.njk.model.ProductResearchActiveModel;
import com.mtnz.njk.model.ProductResearchModel;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Description: 商品信息实体类
 * @Author: FBL
 * @CreateDate: 2019\7\8 0008 18:18
 * @Version: 1.0
 */
@Data
@Table(name = "product")
public class ProductEntity implements Serializable{

    private static final long serialVersionUID = 1686653838735706488L;
    @Id
    @Column(name = "product_id")
    private String productId;
    @Column(name = "product_name")
    private String productName;
    private String remarks;
    @Column(name = "sold_flag")
    private String soldFlag;
    private Integer sort;
    private String postage;
    private String img;
    private String details;
    private String min_buy;
    @Column(name = "repertory_num")
    private String repertoryNum;
    private Integer provider;
    @Column(name = "provider_phone")
    private String providerPhone;
    @Column(name = "type_id")
    private String typeId;
    @Column(name = "provider_name")
    private String providerName;
    private String component;
    @Column(name = "send_shop_day")
    private String sendShopDay;
    private Integer combo;
    @Column(name = "active_img")
    private String activeImg;
    @Column(name = "create_time")
    private String createTime;
    @Column(name = "detail_type_id")
    private String detailTypeId;
    @Column(name = "big_img")
    private Integer bigImg;
    @Column(name = "research_top_img")
    private String researchTopImg;
    @Column(name = "video_url")
    private String videoUrl;
    @Column(name = "combo_img")
    private String comboImg;
    //分享时间
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    @Column(name = "share_time")
    private Date shareTime;
    //分享数
    @Column(name = "share_views")
    private Integer shareViews;

    // 商品产地名称
    @Transient
    private String productionName;

    // 商品轮播图
    @Transient
    private List<ProductImgEntity> productImgEntities;

    // 商品详情
    @Transient
    private List<ProductRemarkEntity> productRemarkEntities;

    // 商品帖子
    @Transient
    private  List<ProductResearchModel> productResearchModels;
    // 活动帖子
    @Transient
    private List<ProductResearchActiveModel> productResearchActiveModels;

    // 有关帖子总数
    @Transient
    private Integer countResearch;

    // 详细类型名字
    @Transient
    private String detailTypeName;
    @Transient
    private ComboEntity comboEntity;


}
